import axios from 'axios'

export function post(config) {
  const instance = axios.create({
    headers: {
      'content-type': 'application/json'
    },
    method: 'post',
    baseURL: 'http://192.168.1.100:8000'
  })
  instance.interceptors.request.use(config => {
    return config
  }, err => {
    console.log(err);
  })

  instance.interceptors.response.use(res => {
    return res.data
  }, error => {
    console.log(error);
  })

  return instance(config)
}
